<?php
/* @var $this OptionsController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'网站设置',
);

$this->menu=array(
	array('label'=>'新增设置', 'url'=>array('create')),
	array('label'=>'网站设置', 'url'=>array('admin')),
);
?>
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
    <ul class="breadcrumb">
        <li><i class="ace-icon fa fa-home home-icon"></i><a href="<?=$this->createUrl('default/index')?>">首页</a></li>
        <li><a href="<?=$this->createUrl('options/custom')?>">自定义设置</a></li>
        <li class="active">更新</li>
    </ul><!-- /.breadcrumb -->
    <div class="nav-search" id="nav-search">
        <form class="form-search">
            <span class="input-icon">
                <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
                <i class="ace-icon fa fa-search nav-search-icon"></i>
            </span>
        </form>
    </div><!-- /.nav-search -->
</div><!-- /.breadcrumbs -->
<div class="page-content">
    <div class="page-header">
        <h1>自定义设置
            <small><i class="ace-icon fa fa-angle-double-right"></i> Update Custom</small>
            <a href="<?=$this->createUrl('options/customCreate')?>" class="btn btn-xs"><i class="fa fa-plus"></i> 创建</a>
        </h1>
    </div><!-- /.page-header -->
    <div class="row">
        <div class="col-xs-12">

            <!-- PAGE CONTENT BEGINS -->
            <?php $form = $this->beginWidget('CActiveForm', array(
                'id'=>'myForm',
                'enableAjaxValidation'=>true,
                'enableClientValidation'=>true,
                //'focus'=>array($model,'website_title'),
                'htmlOptions'=>array('class'=>'form-horizontal'),
            )); ?>
            <?php echo $form->errorSummary($settings); ?>
<?php foreach ($settings as $index => $setting){?>
    <?php //var_dump($setting);?>
            <div class="form-group">
                <label class="col-sm-2 control-label"><?=$setting->name;?></label>
                <div class="col-sm-8">
                    <input type="text" name="Options[<?=$setting->id?>][value]" class="form-control" value="<?=$setting->value?>">
                </div>
                <div class="col-sm-2">
                    <span class='tips'><i class='fa fa-info-circle'></i> <?=$setting->tips;?>  <a class='btn-delete' href='<?=$this->createUrl('options/customDelete',array('id'=>$setting->id))?>' data-confirm='确认要删除此项吗?' title='' data-method='' data-pjax='1'><i style='float: right' class='fa fa-trash-o'></i></a> </span>
                </div>
            </div>
<?php }?>
            <div class="hr hr-18 dotted"></div>
            <div class="clearfix">
                <div class="col-md-offset-2 col-md-10">
                    <button class="btn btn-white btn-info btn-round" type="submit"><i class="ace-icon fa fa-floppy-o bigger-120 blue"></i>保存</button>
                    &nbsp;
                    <button class="btn btn-white btn-default btn-round" type="reset"><i class="ace-icon fa fa-times red2"></i>取消</button>
                </div>
            </div>
            <?php $this->endWidget(); ?>
            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.col -->
    </div><!-- /.row -->
</div><!-- /.page-content -->


